home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2002 January / january_2002.iso / Piposh Special / Piposh / WEST1.DXR / 00151.ls < prev    next >
Encoding:
Text File  |  2004-12-06  |  3.6 KB  |  128 lines

  1. on exitFrame
  2.   global fxpath, mnv, ppl, vppl, trgt, blty, bltx, manleft, psilaa, hppl, bltsprite, psila, xpnt, ypnt, muchpnt
  3.   if not soundBusy(3) then
  4.     sound playFile 3, fxpath & "west.aif"
  5.   end if
  6.   if sprite(3).visible = 1 then
  7.     sprite(3).visible = 0
  8.   end if
  9.   if sprite(9).visible = 1 then
  10.     sprite(10).visible = 1
  11.     sprite(9).visible = 0
  12.     sprite(2).visible = 0
  13.   end if
  14.   if (psila <= 0) and (getAt(mnv, 1) < 2) then
  15.     repeat with i = 1 to 70
  16.       puppetSprite(i, 0)
  17.       sprite(i).visible = 1
  18.       set the keyDownScript to EMPTY
  19.       set the keyUpScript to EMPTY
  20.     end repeat
  21.     go("lost")
  22.   end if
  23.   if random(4) = 1 then
  24.     repeat with i = 2 to count(trgt)
  25.       if getAt(trgt, i) = "a" then
  26.         set the loc of sprite getAt(ppl, i) to point(690, 490)
  27.         setAt(mnv, i, 0)
  28.         setAt(trgt, i, "d")
  29.         setAt(vppl, i, 1000 + i)
  30.       end if
  31.     end repeat
  32.   end if
  33.   if (manleft > 0) and (random(4) = 1) then
  34.     xxx = "no"
  35.     i = 2
  36.     repeat while (i <> "yap") and (i < (count(trgt) + 1))
  37.       if getAt(trgt, i) = "d" then
  38.         xxx = "ok"
  39.         iii = i
  40.         i = "yap"
  41.         next repeat
  42.       end if
  43.       i = i + 1
  44.     end repeat
  45.     if xxx = "ok" then
  46.       hh = [0, 0, 250, 450, 640, 640]
  47.       yy = [225, 340, 480, 480, 400, 260]
  48.       manleft = manleft - 1
  49.       g = random(6)
  50.       setAt(hppl, iii, getAt(hh, g))
  51.       setAt(vppl, iii, getAt(yy, g))
  52.       set the loc of sprite getAt(ppl, iii) to point(getAt(hh, g), getAt(yy, g))
  53.       case g of
  54.         1:
  55.           set the member of sprite getAt(ppl, iii) to member(93, 1)
  56.         2:
  57.           set the member of sprite getAt(ppl, iii) to member(93, 1)
  58.         3:
  59.           set the member of sprite getAt(ppl, iii) to member(67, 1)
  60.         4:
  61.           set the member of sprite getAt(ppl, iii) to member(67, 1)
  62.         5:
  63.           set the member of sprite getAt(ppl, iii) to member(93, 1)
  64.         6:
  65.           set the member of sprite getAt(ppl, iii) to member(93, 1)
  66.       end case
  67.       d = random(2)
  68.       e = [208, 217, 521, 217]
  69.       if d = 1 then
  70.         setAt(trgt, iii, "s")
  71.         setAt(muchpnt, iii, random(3))
  72.         if getAt(muchpnt, iii) = 1 then
  73.           setAt(xpnt, iii, getAt(e, 3))
  74.           setAt(ypnt, iii, getAt(e, 4))
  75.         else
  76.           xtt = getAt(e, 3) - 200 + random(400)
  77.           if xtt < 20 then
  78.             xtt = 20
  79.           end if
  80.           if xtt > 620 then
  81.             xtt = 620
  82.           end if
  83.           setAt(xpnt, iii, xtt)
  84.           setAt(ypnt, iii, getAt(vppl, iii) - random(getAt(vppl, iii) - getAt(e, 4)))
  85.         end if
  86.       else
  87.         setAt(trgt, iii, "b")
  88.         setAt(muchpnt, iii, random(3))
  89.         if getAt(muchpnt, iii) = 1 then
  90.           setAt(xpnt, iii, getAt(e, 1))
  91.           setAt(ypnt, iii, getAt(e, 2))
  92.         else
  93.           xtt = getAt(e, 1) - 200 + random(400)
  94.           if xtt < 0 then
  95.             xtt = 0
  96.           end if
  97.           if xtt > 640 then
  98.             xtt = 640
  99.           end if
  100.           setAt(xpnt, iii, xtt)
  101.           setAt(ypnt, iii, getAt(vppl, iii) - random(getAt(vppl, iii) - getAt(e, 4)))
  102.         end if
  103.       end if
  104.       if g > 4 then
  105.         sprite(getAt(ppl, iii)).flipH = 1
  106.       else
  107.         sprite(getAt(ppl, iii)).flipH = 0
  108.       end if
  109.     end if
  110.   else
  111.     if manleft <= 0 then
  112.       repeat with i = 1 to 70
  113.         puppetSprite(i, 0)
  114.         sprite(i).visible = 1
  115.         set the keyDownScript to EMPTY
  116.         set the keyUpScript to EMPTY
  117.       end repeat
  118.       go("win")
  119.     end if
  120.   end if
  121.   repeat with i = 2 to count(trgt)
  122.     if getAt(trgt, i) <> "d" then
  123.       brain(i)
  124.     end if
  125.   end repeat
  126.   go(marker(0))
  127. end
  128.